package com.hsjk.szwj.module.train.dal.mysql.question;

import com.hsjk.szwj.framework.mybatis.core.mapper.BaseMapperX;
import com.hsjk.szwj.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.hsjk.szwj.module.train.dal.dataobject.question.QuestionChapterDO;
import org.apache.ibatis.annotations.Mapper;

/**
 * @author chenjiawei
 * @desc
 * @Date 2023/08/19 00:38
 **/
@Mapper
public interface IQuestionChapterMapper extends BaseMapperX<QuestionChapterDO> {
    default QuestionChapterDO getChapterOnly(Integer chapterCode,Integer carType,Integer subject) {
        return selectOne(new LambdaQueryWrapperX<QuestionChapterDO>()
                .eq(QuestionChapterDO::getChapterCode, chapterCode)
                .eq(QuestionChapterDO::getCarType,carType)
                .eq(QuestionChapterDO::getSubject,subject));
    }
}
